<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>登录界面</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="../layui/css/layui.css" media="all">
<script type="text/javascript" src="../layui/lay/modules/layer.js"></script>
<script src="../layui/jquery-3.2.1.min.js" charset="utf-8"></script>
<script src="../layui/layui.js" charset="utf-8"></script>

</head>
<style type="text/css">
	#web_bg{
  position:fixed;
  top: 0;
  left: 0;
  width:100%;
  height:100%;
  min-width: 1000px;
  z-index:-10;
  zoom: 1;
  background-color: #fff;
  background-repeat: no-repeat;
  background-size: cover;
  -webkit-background-size: cover;
  -o-background-size: cover;
  background-position: center 0;
}
    .code
    {
            background:url(code_bg.jpg);
            font-family:Arial;
            font-style:italic;
             color:blue;
             font-size:30px;
             border:1;
             padding:2px 3px;
             letter-spacing:3px;
             font-weight:bolder;             
             float:left;            
             cursor:pointer;
             width:128px;
             height:60px;
             line-height:60px;
             text-align:center;
             vertical-align:middle;

    }
    a
    {
        text-decoration:none;
        font-size:12px;
        color:#288bc4;
        }
    a:hover
    {
       text-decoration:underline;
        }
</style>
    <script language="javascript" type="text/javascript">

        var code;
        function createCode(){
            code = "";
            var codeLength = 4; //验证码的长度
            var checkCode = document.getElementById("checkCode");
            var codeChars = new Array(0, 2, 3, 4, 5, 6, 7, 8, 9, 
            'a','b','c','d','e','f','g','h','j','k','m','n','o','p','q','r','s','t','u','v','w','x','y','z',
            'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'); //所有候选组成验证码的字符，当然也可以用中文的
            for (var i = 0; i < codeLength; i++) 
            {
                var charNum = Math.floor(Math.random() * 52);
                code += codeChars[charNum];
            }
            if (checkCode) 
            {
                checkCode.className = "code";
                checkCode.innerHTML = code;
            }
        };
     </script>
     <script language="javascript" type="text/javascript">

        var code;
        function createCode2(){
            code = "";
            var codeLength = 4; //验证码的长度
            var checkCode = document.getElementById("checkCode2");
            var codeChars = new Array(0, 2, 3, 4, 5, 6, 7, 8, 9, 
            'a','b','c','d','e','f','g','h','j','k','m','n','o','p','q','r','s','t','u','v','w','x','y','z',
            'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'); //所有候选组成验证码的字符，当然也可以用中文的
            for (var i = 0; i < codeLength; i++) 
            {
                var charNum = Math.floor(Math.random() * 52);
                code += codeChars[charNum];
            }
            if (checkCode) 
            {
                checkCode.className = "code";
                checkCode.innerHTML = code;
            }
        };
     </script>
     <script language="javascript" type="text/javascript">

        var code;
        function createCode3(){
            code = "";
            var codeLength = 4; //验证码的长度
            var checkCode = document.getElementById("checkCode3");
            var codeChars = new Array(0,2, 3, 4, 5, 6, 7, 8, 9, 
            'a','b','c','d','e','f','g','h','j','k','m','n','o','p','q','r','s','t','u','v','w','x','y','z',
            'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'); //所有候选组成验证码的字符，当然也可以用中文的
            for (var i = 0; i < codeLength; i++) 
            {
                var charNum = Math.floor(Math.random() * 52);
                code += codeChars[charNum];
            }
            if (checkCode) 
            {
                checkCode.className = "code";
                checkCode.innerHTML = code;
            }
        };
     </script>

<body onload="createCode();">
	<div class="wrapper">
    	<div id="web_bg" style="background-image: url(../images/login.png);"></div>
	</div>
	<br>
	<br>
	<br>
	<br>
	<br>
	<br>
	<br>
	<br>
	<br>
	<br>
	<br>
	<div align="center">
		<div id="left">
		<div align="center" class="layui-tab layui-tab-card " style="width: 45%;height: 50%">
			<ul class="layui-tab-title">
				<li id="gr" style="background-color: white">普通用户登录</li>
				<li id="gj" onclick="createCode2();">高级用户登录</li>
				<li id="dw" onclick="createCode3();">单位用户登录</li>
			</ul>
			<div class="layui-tab-content">
				<div class="layui-tab-item layui-show">
			  <form id="form" class="layui-form" action="">
			    
					<label class="layui-form-label">身份证号码 : </label>
					<div class="layui-input-inline" style="width: 45%">
						<input name="account" id="account" class="layui-input" type="text"autocomplete="off" lay-verify="required|number">
					</div>
					
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<a href="javascript:;"><font size="2" id="zc" color="blue">注册？</font></a>
						
					<br> <br> 
					<label class="layui-form-label">密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码 : </label>
					<div class="layui-input-inline" style="width: 45%">
						<input name="password" id="password" class="layui-input" type="password"autocomplete="off" lay-verify="required|number">
					</div>
					
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<a href="javascript:;"><font size="2" id="zh1" color="blue">找回密码？</font></a>
						
					<br><br>
					<label class="layui-form-label">验&nbsp;&nbsp;&nbsp;证&nbsp;&nbsp;&nbsp;码 : </label>
					<div class="code">
						<input name="DXYZ" id="DXYZ" class="layui-input" type="text"autocomplete="off" lay-verify="required|number">
					</div>
					
					<div class="layui-input-inline">
						<div class="code" id="checkCode" onclick="createCode()" ></div>
					</div>
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<a href="javascript:;" onclick="createCode()"><font size="2" color="blue">看不清换一张？</font></a>
					<br>
					<br>
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<input id="submit" type="button" class="layui-btn layui-btn-primary" value="登录">
					<button type="reset" class="layui-btn layui-btn-primary">重置</button>
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<font id="ptcw" style="color: red;"></font>
					</form>
				</div>
				<div class="layui-tab-item">
				 <form class="layui-form" action="">
					<label class="layui-form-label">联名卡卡号 : </label>
					<div class="layui-input-inline" style="width: 45%">
						<input name="account" id="account2" class="layui-input" type="text"
							autocomplete="off" lay-verify="required|number">
					</div>
					
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<a href="javascript:;"><font size="2" id="zc" color="blue">注册？</font></a>
					
					<br>
					<br> 
					
					<label class="layui-form-label">密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码 : </label>
					<div class="layui-input-inline" style="width: 45%">
						<input name="password" id="password2" class="layui-input" type="password"autocomplete="off" lay-verify="required|number">
					</div>
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<a href="javascript:;"><font size="2" id="zh2" color="blue">找回密码？</font></a>
					
					<br><br>
					<label class="layui-form-label">验&nbsp;&nbsp;&nbsp;证&nbsp;&nbsp;&nbsp;码 : </label>
					<div class="code">
						<input name="DXYZ" id="DXYZ2" class="layui-input" type="text"autocomplete="off" lay-verify="required|number">
					</div>
					
					<div class="layui-input-inline">
						<div class="code" id="checkCode2" onclick="createCode2()" ></div>
					</div>
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<a href="javascript:;" onclick="createCode2()"><font size="2" color="blue">看不清换一张？</font></a>
					<br>
					<br>
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

					<input id="submit2" type="button" class="layui-btn layui-btn-primary" value="登录">
					<button type="reset" class="layui-btn layui-btn-primary">重置</button>
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<font id="gjcw" style="color: red;"></font>
				  </form>
				</div>
				<div class="layui-tab-item">
				 <form class="layui-form" action="">
					<label class="layui-form-label">单位账号 : </label>
					<div class="layui-input-inline" style="width: 45%">
						<input name="account" id="account1" class="layui-input" type="text"
							autocomplete="off" lay-verify="required|number">
					</div>
					
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<a href="javascript:;"><font size="2" id="dwzc" color="blue">注册？</font></a>
						
					<br>
					<br> 
					
					<label class="layui-form-label">密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码 : </label>
					<div class="layui-input-inline" style="width: 45%">
						<input name="password" id="password1" class="layui-input" type="password"autocomplete="off" lay-verify="required|number">
					</div>
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<a href="javascript:;"><font size="2" id="zh3" color="blue">找回密码？</font></a>
					<br><br>
					<label class="layui-form-label">验&nbsp;证&nbsp;码&nbsp; : </label>
					<div class="code">
						<input name="DXYZ" id="DXYZ3" class="layui-input" type="text"autocomplete="off" lay-verify="required|number">
					</div>
					
					<div class="layui-input-inline">
						<div class="code" id="checkCode3" onclick="createCode3()" ></div>
					</div>
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<a href="javascript:;" onclick="createCode3()"><font size="2" color="blue">看不清换一张？</font></a>
					<br>
					<br>
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

					<input id="submit1" type="button" class="layui-btn layui-btn-primary" value="登录">
					<button type="reset" class="layui-btn layui-btn-primary">重置</button>
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<font id="dwcw" style="color: red;"></font>
				  </form>
				</div>
			</div>
		</div>
	</div>
  </div>

	<script>
		layui.use('element', function() {
			var $ = layui.jquery, element = layui.element; //Tab的切换功能，切换事件监听等，需要依赖element模块
		});
	</script>
	<script type="text/javascript">
	
	function getPath() {  
	     
	        return 'http://'+location.host;
	}
		
		
	</script>
	<script type="text/javascript" src="../layui/lay/modules/layer.js"></script>
	<script type="text/javascript" src="../layui/layer.ext.js"></script>
      <script type="text/javascript">
	      var pd="1";
	      $("#gr").click(function(){
	    	 pd=1;
	      });
	      $("#dw").click(function(){
	     	 pd=3;
	      });
	      $("#gj").click(function(){
	     	 pd=2;
	      });
			$(document).keyup(function(event){
			  if(event.keyCode ==13){
			    if(pd=="1"){
				 var a=$("#account").val();
	        	 var b=$("#password").val();
	        	 var inputCode = document.getElementById("DXYZ").value;
			            if (inputCode.length <= 0) 
			            {	   
			                layer.msg('请输入验证码！', {icon: 5});		  
			            }
			            else if (inputCode.toUpperCase() != code.toUpperCase()) 
			            {	             
			               layer.msg('验证码输入有误！',{icon: 5});		  
			                createCode();
			            }
	        		  	else if(a==""){
	        			   layer.msg('身份证不能为空！',{icon: 5});
	        		  	}
	        		  	else if(b==""){   
	        			   layer.msg('密码不能为空！',{icon: 5});		    		  
	        		  	}
		        		else if(a!="" && b!=""){
							$.ajax({
								url : getPath()+'/wsyyt/logincontroller/ptdl',
								method : 'post',
								dataType : 'JSON',
								data: {'account':a,'password':b},
								success : function(result) {
									var code = result.code;
									if(code==0){
										
									    window.location.href =getPath()+'/wsyyt/grwsyyt/index.html';   	 								  
									}else{	
									    $("#ptcw").html("提示:"+result.CW);
									}
								}
						});		
	
				};
			    }
			     if(pd=="2"){
			      	 var a=$("#account2").val();
        	 		 var b=$("#password2").val();
        	 		 var inputCode = document.getElementById("DXYZ2").value;
			            if (inputCode.length <= 0) 
			            {
			                layer.msg('请输入验证码！',{icon: 5});
			            }
			            else if (inputCode.toUpperCase() != code.toUpperCase()) 
			            {
			                layer.msg('验证码输入有误！',{icon: 5});
			                createCode2();
			            }
	        		  else if(a==""){
	        			   layer.msg('联名卡号不能为空！',{icon: 5});
	        		  }
	        		   else if(b==""){   
	        			   layer.msg('密码不能为空！',{icon: 5});		  
	        		  }
	        		  else if(a!="" && b!=""){
							$.ajax({
								url : getPath()+'/wsyyt/logincontroller/gjdl',
								method : 'post',
								dataType : 'JSON',
								data: {'account':a,'password':b},
								success : function(result) {
									var code = result.code;
									if(code==0){
										
									    window.location.href =getPath()+'/wsyyt/grwsyyt/index.html';
									   				 								  
									}else{	
										$("#gjcw").html("提示:"+result.CW);
									}
								}
							});							
						};
			    }
			     if(pd=="3"){
				     var a=$("#account1").val();
	        		 var b=$("#password1").val();
	        	  	 var inputCode = document.getElementById("DXYZ3").value;
			            if (inputCode.length <= 0) 
			            {
			                layer.msg('请输入验证码！',{icon: 5});		
			            }
			            else if (inputCode.toUpperCase() != code.toUpperCase()) 
			            {
			                layer.msg('验证码输入有误！',{icon: 5});		
			                createCode3();
			            }
	        		  else if(a==""){
	        			   layer.msg('单位不能为空！',{icon: 5});		 
	        		  }
	        		   else if(b==""){
	        			   layer.msg('密码不能为空！',{icon: 5});		       		  
	        		  }
	        		  else if(a!="" && b!="" ){
	        		  $.ajax({
								url : getPath()+'/wsyyt/logincontroller/dwdl',
								method : 'post',
								dataType : 'JSON',
								data: {'account':a,'password':b},
								success : function(result) {
									var code = result.code;
									if(code==0){
										
									   window.location.href =getPath()+'/wsyyt/dwwsyyt/index.html';
									    	
									}else{				
										$("#dwcw").html("提示:"+result.CW);
										
									}
								}
							});								
						};
			    	}
			  	}
			});
    	  $("#submit").click(function(){
    		 
        	 var a=$("#account").val();
        	 var b=$("#password").val();
        	 var inputCode = document.getElementById("DXYZ").value;
		            if (inputCode.length <= 0) 
		            {	   
		                layer.msg('请输入验证码！',{icon: 5});		  
		            }
		            else if (inputCode.toUpperCase() != code.toUpperCase()) 
		            {	             
		               layer.msg('验证码输入有误！',{icon: 5});		  
		                createCode();
		            }
        		  	else if(a==""){
        			   layer.msg('身份证不能为空！',{icon: 5});		  
        		  	}
        		  	else if(b==""){   
        			   layer.msg('密码不能为空！',{icon: 5});		    		  
        		  	}
	        		else if(a!="" && b!=""){
						$.ajax({
							url : getPath()+'/wsyyt/logincontroller/ptdl',
							method : 'post',
							dataType : 'JSON',
							data: {'account':a,'password':b},
							success : function(result) {
								var code = result.code;
								if(code==0){
								
								  window.location.href =getPath()+'/wsyyt/grwsyyt/index.html';
								     				 								  
								}else{	
									$("#ptcw").html("提示:"+result.CW);
								}
							}
					});		

			};
	});
      </script>
     <script type="text/javascript">
     
    	  $("#submit1").click(function(){
    		 
        	 var a=$("#account1").val();
        	 var b=$("#password1").val();
        	  var inputCode = document.getElementById("DXYZ3").value;
		            if (inputCode.length <= 0) 
		            {
		                layer.msg('请输入验证码！',{icon: 5});		
		            }
		            else if (inputCode.toUpperCase() != code.toUpperCase()) 
		            {
		                layer.msg('验证码输入有误！',{icon: 5});		
		                createCode3();
		            }
        		  else if(a==""){
        			   layer.msg('单位不能为空！',{icon: 5});		 
        		  }
        		   else if(b==""){
        			   layer.msg('密码不能为空！',{icon: 5});		       		  
        		  }
        		  else if(a!="" && b!="" ){
        		  $.ajax({
							url : getPath()+'/wsyyt/logincontroller/dwdl',
							method : 'post',
							dataType : 'JSON',
							data: {'account':a,'password':b},
							success : function(result) {
								var code = result.code;
								if(code==0){
									
								   window.location.href =getPath()+'/wsyyt/dwwsyyt/index.html';
								    	
								}else{				
									
								   $("#dwcw").html("提示:"+result.CW);
								    
								}
							}
					});								
			};
	});
      </script>
      <script type="text/javascript">
     
    	  $("#submit2").click(function(){
    		 
        	  var a=$("#account2").val();
        	  var b=$("#password2").val();
        	  var inputCode = document.getElementById("DXYZ2").value;
		            if (inputCode.length <= 0) 
		            {
		                layer.msg('请输入验证码！',{icon: 5});
		            }
		            else if (inputCode.toUpperCase() != code.toUpperCase()) 
		            {
		                layer.msg('验证码输入有误！',{icon: 5});
		                createCode2();
		            }
        		  else if(a==""){
        			   layer.msg('联名卡号不能为空！',{icon: 5});
        		  }
        		   else if(b==""){   
        			   layer.msg('密码不能为空！',{icon: 5});		  
        		  }
        		  else if(a!="" && b!=""){
						$.ajax({
							url : getPath()+'/wsyyt/logincontroller/gjdl',
							method : 'post',
							dataType : 'JSON',
							data: {'account':a,'password':b},
							success : function(result) {
								var code = result.code;
								if(code==0){
									
								   window.location.href =getPath()+'/wsyyt/grwsyyt/index.html';
								    				 								  
								}else{	
									$("#gjcw").html("提示:"+result.CW);
								}
							}
						});							
					};
				});
      </script>
      <script type="text/javascript">
			$("#zc").click(function() {
				window.location.href =getPath()+'/wsyyt/login/zc.html';
			});
			$("#zh1").click(function() {
				window.location.href =getPath()+'/wsyyt/login/PT_zhmm.html';
			});
			$("#zh2").click(function() {
				window.location.href =getPath()+'/wsyyt/login/GJ_zhmm.html';
			});
			$("#zh3").click(function() {
				window.location.href =getPath()+'/wsyyt/login/DW_zhmm.html';
			});
			$("#dw").click(function() {
				$("#gr").attr("style","false");
			});
			$("#gj").click(function() {
				$("#gr").attr("style","false");
				$("#dw").attr("style","false");
			});
			$("#dwzc").click(function() {
				window.location.href =getPath()+'/wsyyt/login/DW_zc.html';
			});
	  </script>
</body>
</html>